<!DOCTYPE html>
<script src="../../../resources/gesture-util.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<span id="parent">
    <div id="target" style="border:solid 1px green; width:220px; height:70px; overflow:scroll">
        TOP TOP TOP TOP TOP TOP TOP
        Scroll mouse wheel over here
        Scroll mouse wheel over here
        Scroll mouse wheel over here
        Scroll mouse wheel over here
        Scroll mouse wheel over here
        Scroll mouse wheel over here
        END END END END END END END
    </div>
</span>

<script>
var receivedMouseWheel = false;
var testEvent;

function wheelHandler(e) {
    testEvent = e; 
}

function mouseWheelHandler(e) {
    receivedMouseWheel = true;
}

promise_test(async () => {
    var div = document.getElementById('target');
    div.addEventListener('wheel', wheelHandler);
    div.addEventListener('mousewheel', mouseWheelHandler);
    var center = elementCenter(div);
    await wheelTick(-20, -20, center, 4000);

    assert_equals(testEvent.__proto__, WheelEvent.prototype, "Standard wheel event was fired.");
    assert_false(receivedMouseWheel, "mousewheel event should not have fired.");
}, "Tests the interaction between the standard and the non-standard 'mousewheel'.");

</script>
